package com.ruoyi.qif.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qif.mapper.QifGuestMapper;
import com.ruoyi.qif.domain.QifGuest;
import com.ruoyi.qif.service.IQifGuestService;
import com.ruoyi.common.core.text.Convert;

/**
 * 锜风公寓-房间住客Service业务层处理
 * 
 * @author David
 * @date 2025-10-05
 */
@Service
public class QifGuestServiceImpl implements IQifGuestService 
{
    @Autowired
    private QifGuestMapper qifGuestMapper;

    /**
     * 查询锜风公寓-房间住客
     * 
     * @param guestId 锜风公寓-房间住客主键
     * @return 锜风公寓-房间住客
     */
    @Override
    public QifGuest selectQifGuestByGuestId(Long guestId)
    {
        return qifGuestMapper.selectQifGuestByGuestId(guestId);
    }

    /**
     * 查询锜风公寓-房间住客列表
     * 
     * @param qifGuest 锜风公寓-房间住客
     * @return 锜风公寓-房间住客
     */
    @Override
    public List<QifGuest> selectQifGuestList(QifGuest qifGuest)
    {
        return qifGuestMapper.selectQifGuestList(qifGuest);
    }

    /**
     * 新增锜风公寓-房间住客
     * 
     * @param qifGuest 锜风公寓-房间住客
     * @return 结果
     */
    @Override
    public int insertQifGuest(QifGuest qifGuest)
    {
        qifGuest.setCreateTime(DateUtils.getNowDate());
        return qifGuestMapper.insertQifGuest(qifGuest);
    }

    /**
     * 修改锜风公寓-房间住客
     * 
     * @param qifGuest 锜风公寓-房间住客
     * @return 结果
     */
    @Override
    public int updateQifGuest(QifGuest qifGuest)
    {
        qifGuest.setUpdateTime(DateUtils.getNowDate());
        return qifGuestMapper.updateQifGuest(qifGuest);
    }

    /**
     * 批量删除锜风公寓-房间住客
     * 
     * @param guestIds 需要删除的锜风公寓-房间住客主键
     * @return 结果
     */
    @Override
    public int deleteQifGuestByGuestIds(String guestIds)
    {
        return qifGuestMapper.deleteQifGuestByGuestIds(Convert.toStrArray(guestIds));
    }

    /**
     * 删除锜风公寓-房间住客信息
     * 
     * @param guestId 锜风公寓-房间住客主键
     * @return 结果
     */
    @Override
    public int deleteQifGuestByGuestId(Long guestId)
    {
        return qifGuestMapper.deleteQifGuestByGuestId(guestId);
    }
}
